Remove execute permission from xend-debug.log
authorKeir Fraser <keir@xensource.com>
Tue, 24 Apr 2007 20:48:09 +0000 (21:48 +0100)
committerKeir Fraser <keir@xensource.com>
Tue, 24 Apr 2007 20:48:09 +0000 (21:48 +0100)
The file /var/log/xen/xend-debug.log is currently being created with
executable permission bits set. This is because the os.open() method
defaults to using a mode of 0777 if no third parameter is provided.
The attached patch changes the mode to 0600 to ensure that the file
permissions come out as -rw-------  instead of -rwxr-xr-x

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
tools/python/xen/xend/server/SrvDaemon.py

index 262de4e259b1367bd0eb2818a78e0094ac11794c..e67c56a9d987ca311e6112136aa232ea88a7919c 100644 (file)
@@ -119,7 +119,7 @@ class Daemon:
         try:
             parent = os.path.dirname(XEND_DEBUG_LOG)
             mkdir.parents(parent, stat.S_IRWXU)
-            fd = os.open(XEND_DEBUG_LOG, os.O_WRONLY|os.O_CREAT|os.O_APPEND)
+            fd = os.open(XEND_DEBUG_LOG, os.O_WRONLY|os.O_CREAT|os.O_APPEND, 0600)
         except Exception, exn:
             print >>sys.stderr, exn
             print >>sys.stderr, ("Xend failed to open %s.  Exiting!" %